package com.activenetwork.smlite.page.ActiveEventFlow;



import org.apache.commons.lang3.StringUtils;

import com.activenetwork.custom.uielement.UIElement;
import com.activenetwork.custom.uielement.decorate.InJson;
import com.activenetwork.smlite.page.event.EventDetailView.EventBasicSubview;
import com.activenetwork.smlite.page.generic.ModelPage;
import com.activenetwork.util.PageLoader;

public class EventComponentView extends ModelPage {

	@InJson
	private UIElement welcomeSkipGuide;
	
	@InJson
	private UIElement sourcingFeature;
	
	@InJson
	private UIElement noGuideDone;
	
	/**
	 * Skip the guide 
	 * @return
	 */
	public EventComponentView skipGuide(){
		welcomeSkipGuide.click();
		return PageLoader.load(EventComponentView.class);
	}
	
	public EventComponentView enableSourcingFeature(){
		String classValue = sourcingFeature.getAttribute("class");
		if(!StringUtils.contains(classValue, "btn-primary")){ //if enabled, class attribute value will change
			sourcingFeature.click();
		}
		return PageLoader.load(EventComponentView.class);
	}
	
	public EventBasicSubview noGuidedDone(){
		noGuideDone.click();
		return PageLoader.load(EventBasicSubview.class);
	}
}
